Following the out links to the end of the tracebility

Hi there , 

I have the following trace-ability 

module a -> module b ->module c->module d->module e 

I need to fetch the attributes of the module e in the DXL attribute in the module A . 

Could you please let me know the code for it . I have searched for the code in the forum, but those were confusing ... however , i already tried in recursive analysis mode via options , but it is not giving me the proper result though

 


doors@36677 - Mon Jul 09 11:33:55 EDT 2018

Re: Following the out links to the end of the tracebility
Rolan - Mon Jul 09 12:29:34 EDT 2018

I use this type of pattern:

 

void processLinks(Object &o, string destModule, void process(Object)) {
   Object lo;
   Link l;
   string fn, mn;


   for l in o->"*" do {
      fn = fullName(target(l));
      mn = name(target(l));
      if (destModule == mn) {
         if (!open(module fn)) read(fn, false);
         lo = target(l);
         process(lo);
      } // end if
   } // end for

}

void processE(Object o) {
  // assign the dxl attribute
  obj."dxlattributeName" = o."whicheverattribute" "";
}

void processD(Object o) {
  processLinks(o, "moduleNameE", processE);
}


void processC(Object o) {
  processLinks(o, "moduleNameD", processD);
}


void processB(Object o) {
  processLinks(o, "moduleNameC", processC);
}


processLinks(obj, "moduleNameB", processB);